import os
import uiautomation
from config.config import DATA_PATH
from page.index import IndexPage
from page.门诊护士站.menzhenhushizhan__page import menzhenhushizhan
from tools.sjqd_way import read_data_from_excel
class Tiaoshi():
    his = uiautomation.WindowControl(searchDepth=1, Name='科玛奇医院信息管理系统')  # 锁定窗口
    his.SetFocus()
    def menzhenhushizhan_zhushedan(self):
        self.data = read_data_from_excel(os.path.join(DATA_PATH, "datas.xls"), "测试患者")
        name = self.data[0][0]
        ap = IndexPage()
        bp = menzhenhushizhan()
        ap.click_mzhsz1_btn()  # 点击门诊护士站
        ap.click_mzhsz2_btn()  # 点击门诊护士站
        bp.input_xm(name)
        bp.click_wzx_btn()  # 点击未执行
        bp.click_qbks_btn()  # 点击全部科室
        bp.click_zsd_xxk()  #点击注射单选项卡
        bp.click_cx_btn()  # 点击查询按钮
        bp.click_hzsj1()  # 点击患者
        bp.click_qxbt_btn()  #点击全选标头
        bp.click_zx_btn()  # 点击执行按钮
if __name__ == '__main__':
    Tiaoshi().menzhenhushizhan_zhushedan()
